home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / tw2_1110.zip / EDTEXT.ZIP / EDTEXT.DOC next >
Text File  |  1990-06-29  |  5KB  |  148 lines

  1.  
  2. EdText.Doc     -- TradeWars text editor
  3.  
  4.  
  5. I'll try to make this document short and simple. 
  6.  
  7. Filenames.. Who/Where/What/Why/How.. etc.
  8. -----------------------------------------
  9.  
  10.   Included in the TW package are 2 files which contain the text  used
  11. by Tradewars. They are TW2TEXT.DAT and TWMTEXT.DAT. The first is used
  12. by TW2.EXE, the second by TWMAINT.EXE.  These files are in plain text
  13. format, and cannot be used by the EXE files in that form. So, your job
  14. is to edit those two files, and then tell EDTEXT to 'compile' the files.
  15. You will be asked for a filename. If you are editing TW2TEXT.DAT, then
  16. you will enter TW2.ENG. If you are editing TWMTEXT.DAT then you will
  17. enter TWMAINT.ENG.
  18.  
  19. You may use a different extension if you wish. For instance, you may
  20. enter 'FRE' for a french version, or 'SPA' for a spanish version.
  21.  
  22. If you are using a different language you may change the default from
  23. ENG to whatever using the editor (main options).  If you changed it to
  24. FRE, then TW will look for TW2.FRE as the default.
  25.  
  26. PCBoard users, if the PCBOARD.SYS file has an extension in it, TW will
  27. use that extension for the text file. So make sure it exists!
  28.  
  29. Keys used by EdText
  30. -------------------
  31.  
  32. Active keys in Edtext are:
  33.  
  34. Insert  --  Toggles insert mode
  35.  
  36. Alt-C   --  Compile text. You will be prompted for a filename.
  37.  
  38. Alt-F   --  Find a string in the text file
  39.  
  40. Alt-L   --  Load a text file.
  41.  
  42. Alt-S   --  Save text file.
  43.  
  44.  
  45. How text is formatted:
  46. ----------------------
  47.  
  48. First and foremost, each line will be contained by opening and closing
  49. quotes. The FIRST and LAST quotes will be stripped off when you Compile
  50. the text using Alt-C.
  51.  
  52. Most text can be simply translated into the other language straight across
  53. but some cannot.  Some text will have special chars like: '%s' or '%d'
  54. embedded in them. They mean:
  55. '%s'    -- put a string in here
  56. '%d'    -- put an integer here
  57. '%u'    -- put an unsigned integer here
  58. '%ld'   -- put a long integer here
  59. '%c'    -- put a single character here
  60. '%f'    -- put a floating point number here.
  61.  
  62. some of these will have 'precision' numbers in them like so: '%14ld'
  63.  
  64. in most every single case you will NOT change these! You will change the
  65. text surrounding these sequences.  So if you find a string that looks like
  66. this:
  67. " %d %s%s %u"
  68.  
  69. You will not need to change string like that.
  70.  
  71. TW will be VERY limited as to the translations. For instance Y or N for
  72. YES or NO, will always have to be Y or N  so don't change them, just
  73. change the sentence preceding the Y or N.
  74.  
  75. If you have a string that looks like:
  76. "We have %u fighters"  
  77. TW will put the correct number in the place of the '%u'.
  78.  
  79. You will see things like:
  80.  
  81. "We are %sing %d units."
  82.  
  83. When the user sees it, it will look like:
  84. "We are Buying 65 units."
  85.  
  86. the '%s' was changed to 'Buy' and the '%d' was changed to '65'
  87.  
  88. The order  of the '%x' variables must always remain the same!
  89. The number of the '%x' variables must always remain the same!
  90.  
  91. I think what I'm trying to say is this:  The verbs and nouns must be in
  92. the same order as they would in English.  Lets say you were gonna 
  93. translate the above string, you couldn't change it to:
  94. "%d units, we are %sing."  or  "65 units, we are Buying"
  95.  
  96. If the '%s' precedes the '%d' in the english string, then the '%s' MUST
  97. precede the '%d' in the new string.
  98.  
  99. Admittedly, this may not work in many cases.  Its up to the translator.
  100.  
  101. The best thing to do is experiment, to get the best results.  TW
  102. has a lot of text, so it may take a while.. but it should be worth it.
  103. As translations come in, I will add them to the released product.
  104.  
  105.  
  106. Other special characters you will see:
  107. --------------------------------------
  108.  
  109. In TWMTEXT.DAT you will see lots of backslash characters ( \ ). These
  110. signal special sequences starting with the next char. For instance,
  111. if you see:
  112. '\n'  those two chars will be replaced by one newline character (ASCII 10)
  113.  
  114. others you will see:
  115. '\r'  this will be replaced by one carriage return char (ASCII 13)
  116. '\"'  this will be replaced by a single double quote  ( " )
  117.  
  118. These are necessary for proper text formatting on the screen.
  119. Also you will see:
  120. '\x1B[3n;4nm'  (where 'n' is a number between 1 and 7)
  121. This is an ANSI escape sequence, usually used to change screen colors.
  122. The '\x1B' will be change into a single ESCape character (ASCII 27) 
  123.  
  124. In this way you can eliminate, or change colors of the TWMaint screens.
  125.  
  126.  
  127. Other items:
  128. ------------
  129.  
  130. EdText can also be used by anyone, just to change the flavor of their
  131. TradeWars game. To give it that 'personal' touch. In other words, it
  132. isn't just for other languages.
  133.  
  134. Of course, I don't want anyone changing my ZIP files, and distributing
  135. a bunch of personalized TW2's.. but if you like, you can ZIP up your
  136. personal changes and distribute the separately for other SysOps to use
  137. if you like. For instance, ZIP up your modified TW2TEXT.DAT and 
  138. TWMTEXT.DAT and let other people take a look.
  139.  
  140.  
  141. Thats all for now..  EdText is a VERY primitive text editor, designed
  142. for this function only!  It will not allow you to add or subtract lines
  143. it will only allow you to modify the lines already in the text files.
  144. It works the way it does to protect you from making something TW can't
  145. handle.
  146.  
  147. John Morris - TradeWars Software
  148.